package top.lshaci.learning.springboot.web.model;

import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ListValid
 *
 * @author liangxu
 */
@Data
public class ListValid {

    @NotBlank(message = "姓名不能为空")
    private String name;

    @NotNull(message = "年龄不能为空")
    @Range(min = 18, max = 80, message = "年龄范围应该在{min}到{max}之间")
    private Integer age;
}
